home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-07-19 | 6.7 KB | 140 lines | [TEXT/pdos] |
- Backup -- Directory File Backup
-
- Syntax Backup [option...] -from 'directory' -to 'directory'
-
- Description Files in a source ("from") directory are copied to a destination
- ("to") directory based on the modification date. By default, only
- files that already exist in both the source and destination
- directories are candidates for copying. (The -a option can
- override this default.) Backup does not actually make the copies.
- Instead, it generates a script of APW Shell Duplicate commands.
- (The -doit option can override this default.)
-
- Backup-s default operation is based on the premise that you already
- have an existing directory on two sets of disks (generally a hard
- disk and a set of 3.5-inch disks) and that you want to make sure
- that the files on one of the disks are the same as the files on the
- other disk. Thus, it is the files on the destination ("to") disk
- that determine which files can be copied from the source ("from")
- disk.
-
- A shell Duplicate command is generated to the standard output file
- if
- o a file on a source disk also exists on the destination disk,
- and
- o the modification date of the source is newer than that of the
- destination.
-
- In addition to the basic function of generating shell duplicate
- commands, Backup also provides these services:
-
- o Directories can be recursively processed, allowing processing
- of all directories and subdirectories contained with
- directories (-f).
- o (More to come in the future, hopefully...)
-
- Input None.
-
- Output For each file to be copied, a shell Duplicate command is generated
- to the standard output file as follows:
-
- Duplicate FromFile ToFile
-
- If you are using the -e option, then the shell's Eject commands are
- generated at the end of the list of Duplicates. These commands
- cause the source and/or destination disks to eject if the -from and
- -to options specify as parameters either or boths disks as
- removeable media (i.e. contained in a floppy disk drive).
-
- Diagnostics Errors and warnings are written to the diagnostic output file. If
- you specify the -p option, progress information is written to
- diagnostic output also.
-
- Status Backup may return the following status codes:
-
- 0 No errors; Duplicate commands have been generated
- 1 Parameter or option error
- 2 System error
- 3 No errors and no files to duplicate
-
- Note: Backup returns a status code of 3 when no files need
- copying. If no files are copied because NONE of the files in the
- source directory exists in the destination directory, Backup also
- reports a warning ot the diagnostic output file. If there are no
- name matches, it is possible that your from/to pathnames were
- specified incorrectly. Hence, Backup lets you know of the possible
- error. Backup does not report this as an error if you use the -a
- option.
-
- Options -a Normally, a file in the source ("from") is ignored if it does
- not exist in the destination ("to"). Using the -a option
- forces Backup to generate a shell Duplicate command for all
- files in the source that don't exist in the destination.
-
- -c Create directories. When a directory name doesn't exist in the
- destination disk and there are files in the source to copy, -c
- generates a shell Create command to create the directory on the
- destination disk. Note that this option makes sense only if
- you are using the -a option.
-
- -doit
- When this option is specified, Backup will send a command
- string to the APW shell for direct execution instead of writing
- the command string to standard output.
-
- -e Eject the disk(s) from the drive if the disk is removeable.
- Disks are ejected when Backup terminates if there are no files
- to duplicate. If Duplicate commands are generated, then shell
- Eject commands are generated to eject the specified disk(s).
-
- -from directory
- Specify the directory from which to get the source list of
- files. If this option is omitted, the list will be built from
- the current directory. This directory may be specified as
- either a GS/OS pathname or device name.
-
- -lastcmd 'cmd'
- Generate the specified command as the last command. For
- example, a Beep command could be generated to signal that all
- the duplicates have been completed.
-
- -p Write Backup's version number and progress information to
- diagnostic output.
-
- -r Recursively process subdirectories encountered.
-
- -t 'type'
- Consider only files of the specified 'type' as candidates for
- backup. 'type' may be specified as a decimal or hexadecimal
- (preceeded by '$') number, or as a 3 character mnemonic.
- Backup recognizes the following mnemonics:
-
- TXT - text files
- BIN - binary files
- SRC - APW source files
- OBJ - APW object files
- LIB - APW library files
- S16 - GS/OS applications
- RTL - Run Time Library files
- EXE - APW shell utilities
- PIF - Permanent initialization files
- TIF - Temporary initialization files
- NDA - New desk accessory files
- CDA - Classic desk accessory files
- TOL - Apple IIGS Tool files
- SYS - ProDOS 8 applications
-
- -to 'directory'
- Specify the directory from which to get the destination list of
- files. If the -to option is omitted and the -from option was
- specified, the destination will default to the current
- directory. You MUST specify the -to if -from is omitted.
-
- Examples
- Backup -from .AppleDisk3.5A -to */APW -r
-
- Recursively compares files and directories on your first 3.5" drive
- to the corresponding files and directories in the APW directory of
- your boot drive. This is a very easy way to update your APW system
- when an update is received.
-